package com.erp.service.sales.impl;

import com.erp.domain.ErpCustomer;
import com.erp.domain.ErpSalesOutbound;
import com.erp.domain.ErpSalesProduct;
import com.erp.mapper.sales.SalesOutBoundMapper;
import com.erp.service.sales.IErpSalesService;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Collections;
import java.util.List;

/**
 * @Author cuicui
 * @Description
 * @Date 2025-9-1
 */
@Service
public class ErpSalesServiceImpl implements IErpSalesService {
    @Autowired
    private SalesOutBoundMapper salesOutBoundMapper;

    // 查询销售单列表
    @Override
    public List<ErpSalesOutbound> selectErpSalesList(ErpSalesOutbound erpSalesOutbound) {
        return salesOutBoundMapper.list(erpSalesOutbound);
    }

    // 查询客户
    @Override
    public List<ErpCustomer> selectErpCustomerById(String customerId) {
        return salesOutBoundMapper.selectErpCustomerById(customerId);
    }

    // 查询商品
    @Override
    public List<ErpSalesProduct> selectErpProductById(String soNo) {
        return salesOutBoundMapper.selectErpProductById(soNo);
    }

    @Override
    public List<Double> countByAllAmount() {
        return salesOutBoundMapper.countByAllAmount();
    }

    @Override
    public List<String> countBySoNo() {
        return salesOutBoundMapper.countBySoNo();
    }

}
